﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LevelEditor
{
    public partial class AddNew : Form
    {
        public AddNew()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void AddNew_Load(object sender, EventArgs e)
        {

        }

        private void submitButton_Click(object sender, EventArgs e)
        {
            int xValue = int.Parse(xBox.Text);   // parses the text into ints
            int yValue = int.Parse(yBox.Text);

            // Creates a new EditorForm
            EditorForm form = new EditorForm(xValue, yValue, nameBox.Text);
            Dispose();
            form.ShowDialog();
        }

        private void clearButton_Click(object sender, EventArgs e)
        {
            nameBox.Text = "";
            xBox.Text = "";
            yBox.Text = "";
        }
    }
}
